﻿using System;

namespace DecoratorPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            //基础的对象
            BaseDecorator baseDecorator = new Thieves();

            //帽子装饰器
            baseDecorator = new HatDecorator(baseDecorator);

            //鞋子装饰器
            baseDecorator = new ShoesDecorator(baseDecorator);

            //执行方法
            baseDecorator.Action();

            Console.ReadKey();

        }
    }
}
